package com.longy.nio;

import java.util.Arrays;

public class LeetCode {
    public static void main(String[] args) {
        int[] nums = new int[]{2, 5, 1, 3, 4, 7};
        int n = nums.length / 2;
        int[] shuffle = shuffle(nums, n);
        System.out.println(Arrays.toString(shuffle));
    }

    public static int[] shuffle(int[] nums, int n) {
        int[] ints = new int[2*n];
        int temp;
        for (int i = 0; i < n; i++) {
            ints[i * 2] = nums[i];
            ints[i * 2+1] = nums[n+i];
        }

        return ints;
    }
}
